<!--Copyright https://gitee.com/laiyw/manage-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="icon" href="statics/images/favicon.ico" type="image/x-icon"/>
    <title>Manage</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="plugins/AdminLTE/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="plugins/AdminLTE/dist/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="plugins/AdminLTE/dist/css/ionicons.min.css">
    <!-- toastr -->
    <link rel="stylesheet" href="plugins/toastr/toastr.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="plugins/AdminLTE/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="plugins/AdminLTE/dist/css/skins/all-skins.min.css">

    <!--http://aimodu.org:7777/admin/index_iframe.html?q=audio&search=#-->
    <style type="text/css">
        html {
            overflow: hidden;
        }
    </style>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="plugins/AdminLTE/plugins/ie9/html5shiv.min.js"></script>
    <script src="plugins/AdminLTE/plugins/ie9/respond.min.js"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini fixed">
<!--Copyright https://gitee.com/laiyw/manage-->
<div class="wrapper">
    <!--Copyright https://gitee.com/laiyw/manage-->
    <header class="main-header">
        <!-- Logo -->
        <a href="index.html" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>Man</b></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>Manage</b></span>
        </a>
        <nav class="navbar navbar-static-top">
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- 消息-->
                    <li class="dropdown messages-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-envelope-o"></i>
                            <span class="label label-success">1</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">You have 1 messages</li>
                            <li>
                                <ul class="menu">
                                    <li>
                                        <a href="#">
                                            <div class="pull-left">
                                                <img src="statics/images/default-user/avatar3.png"
                                                     class="img-circle" alt="User Image">
                                            </div>
                                            <h4>
                                                AdminLTE Design Team
                                                <small><i class="fa fa-clock-o"></i> 2 hours</small>
                                            </h4>
                                            <p>Why not buy a new awesome theme?</p>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li class="footer"><a href="#">See All Messages</a></li>
                        </ul>
                    </li>

                    <!-- 通知 -->
                    <li class="dropdown notifications-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-bell-o"></i>
                            <span class="label label-warning">2</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">You have 2 notifications</li>
                            <li>
                                <ul class="menu">
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-users text-aqua"></i> 5 new members joined today
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-warning text-yellow"></i> Very long description here that
                                            may not fit into the
                                            page and may cause design problems
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li class="footer"><a href="#">View all</a></li>
                        </ul>
                    </li>

                    <!-- 任务 -->
                    <li class="dropdown tasks-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-flag-o"></i>
                            <span class="label label-danger">2</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">You have 2 tasks</li>
                            <li>
                                <ul class="menu">
                                    <li><!-- Task item -->
                                        <a href="#">
                                            <h3>
                                                Some task I need to do
                                                <small class="pull-right">60%</small>
                                            </h3>
                                            <div class="progress xs">
                                                <div class="progress-bar progress-bar-red" style="width: 60%"
                                                     role="progressbar"
                                                     aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                    <span class="sr-only">60% Complete</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <!-- end task item -->
                                    <li><!-- Task item -->
                                        <a href="#">
                                            <h3>
                                                Make beautiful transitions
                                                <small class="pull-right">80%</small>
                                            </h3>
                                            <div class="progress xs">
                                                <div class="progress-bar progress-bar-yellow" style="width: 80%"
                                                     role="progressbar"
                                                     aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                    <span class="sr-only">80% Complete</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <!-- end task item -->
                                </ul>
                            </li>
                            <li class="footer">
                                <a href="#">View all tasks</a>
                            </li>
                        </ul>
                    </li>

                    <!-- 用户信息 -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="statics/images/default-user/avatar5.png" class="user-image"
                                 alt="User Image">
                            <span class="hidden-xs user_account"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <img src="statics/images/default-user/avatar5.png" class="img-circle"
                                     alt="User Image">
                                <p>
                                    <span class="organization_name"></span><br>
                                    <span class="role_names"></span>
                                </p>
                            </li>
                            </li>
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="javascript:addTabs({id:'user_info_panel',title: '个人中心',close: true,url: 'pages/user-info.html',urlType: 'relative'});"
                                       class="btn btn-default btn-flat">个人中心</a>
                                </div>
                                <div class="pull-right">
                                    <a href="/manage/logout" class="btn btn-default btn-flat">退出登录</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- 控制侧边栏切换按钮 -->
                    <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>

    <aside class="main-sidebar">
        <section class="sidebar">
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="statics/images/default-user/avatar5.png" class="img-circle" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p class="user_name"></p>
                    <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                    <a href="/manage/logout"><i class="fa fa-sign-out text-red"></i> 注销</a>
                </div>
            </div>
            <!-- search form -->
            <form onsubmit="return false" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search...">
                    <span class="input-group-btn">
                        <button type="button" name="search" id="search-btn" class="btn btn-flat"
                                onclick="search_menu()">
                            <i class="fa fa-search"></i>
                        </button>
                    </span>
                </div>
            </form>
            <ul class="sidebar-menu"></ul>
        </section>
    </aside>

    <div class="content-wrapper" id="content-wrapper" style="min-height: 421px;">
        <div class="content-tabs">
            <button class="roll-nav roll-left tabLeft" onclick="scrollTabLeft()">
                <i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs menuTabs tab-ui-menu" id="tab-menu">
                <div class="page-tabs-content" style="margin-left: 0px;"></div>
            </nav>
            <button class="roll-nav roll-right tabRight" onclick="scrollTabRight()">
                <i class="fa fa-forward" style="margin-left: 3px;"></i>
            </button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown tabClose" data-toggle="dropdown">
                    页签操作<i class="fa fa-caret-down" style="padding-left: 3px;"></i>
                </button>
                <ul class="dropdown-menu dropdown-menu-right" style="min-width: 128px;">
                    <li><a class="tabReload" href="javascript:refreshTab();">刷新当前</a></li>
                    <li><a class="tabCloseCurrent" href="javascript:closeCurrentTab();">关闭当前</a></li>
                    <li><a class="tabCloseAll" href="javascript:closeOtherTabs(true);">全部关闭</a></li>
                    <li><a class="tabCloseOther" href="javascript:closeOtherTabs();">除此之外全部关闭</a></li>
                </ul>
            </div>
            <button class="roll-nav roll-right fullscreen" onclick="App.handleFullScreen()"><i
                    class="fa fa-arrows-alt"></i></button>
        </div>
        <div class="content-iframe ">
            <div class="tab-content " id="tab-content"></div>
        </div>
    </div>

    <!-- 底部版权信息 -->
    <!--<footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 1.0.0
        </div>
        <strong>Copyright &copy; 2018 <a href="https://gitee.com/laiyw/manage">Laiyw</a></strong> 版权所有
    </footer>-->

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Create the tabs -->
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs"></ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <!-- Home tab content -->
            <div class="tab-pane" id="control-sidebar-home-tab"></div>
        </div>
    </aside>
    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 2.2.3 -->
<script src="plugins/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="plugins/AdminLTE/bootstrap/js/bootstrap.min.js"></script>
<!-- Slimscroll -->
<script src="plugins/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="plugins/AdminLTE/plugins/fastclick/fastclick.js"></script>
<!-- toastr -->
<script src="plugins/toastr/toastr.min.js"></script>
<!-- AdminLTE App -->
<script src="plugins/AdminLTE/dist/js/app.js"></script>
<script src="statics/js/index.js"></script>
<!--tabs-->
<script src="plugins/AdminLTE/dist/js/app_iframe.js"></script>
<script type="text/javascript">
    //本地搜索菜单
    function search_menu() {
        //要搜索的值
        var text = $('input[name=q]').val();
        var $ul = $('.sidebar-menu');
        $ul.find("a.nav-link").each(function () {
            var $a = $(this).css("border", "");
            //判断是否含有要搜索的字符串
            if ($a.children("span.menu-text").text().indexOf(text) >= 0) {
                //如果a标签的父级是隐藏的就展开
                $ul = $a.parents("ul");
                if ($ul.is(":hidden")) {
                    $a.parents("ul").prev().click();
                }
                //点击该菜单
                $a.click();//.css("border", "1px solid");
            }
        });
    }

    function setUserInfo(data) {
        $(".user_account").html(data.account);
        $(".user_name").html(data.username);
        $(".organization_name").html(data.organizationName);
        $(".role_names").html(data.roleNames);
        $('.sidebar-menu').empty().sidebarMenu({data: recursionMenu(data.menuList)});
    }

    function getUrlParam(search, name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = search.substr(1).match(reg);
        if (r != null) {
            return decodeURIComponent(r[2], true);
        }
        return null;
    }

    //序列化表单参数（用于bootstrapTable 分页） params：bootstrapTable参数，serialize表单的序列化值
    function serializeParams(params, serialize) {
        var resultParams = {};
        serialize = decodeURIComponent(serialize, true);
        //分页参数
        resultParams.pageSize = params.limit;
        resultParams.pageNum = (params.offset / params.limit) + 1;
        //表单参数
        var nv;
        $.each(serialize.split("&"), function (ind, val) {
            nv = val.split("=");
            if (nv[0].indexOf("Time") > -1) {//时间经过序列化，空格会序列化成“+”号，此处进行替换
                nv[1] = nv[1].replace(/\+/g, " ");
            }
            resultParams[nv[0]] = nv[1];
        })
        return resultParams;
    }

    function recursionMenu(data) {
        var nodes = [];
        $.each(data, function (index, value) {
            var node = {};
            node["id"] = value.id;
            node["text"] = value.name;
            node["icon"] = value.icon;
            node["url"] = value.url;
            if (value.children && value.children.length > 0) {
                node["children"] = recursionMenu(value.children);
            } else {
                node["targetType"] = "iframe-tab";
            }
            nodes.push(node);
        })
        return nodes;
    }

    $(function () {
        App.setbasePath("../");
        App.setGlobalImgPath("plugins/AdminLTE/dist/img/");
        addTabs({
            id: 'dashboard_panel',
            title: '仪表盘',
            close: false,
            url: 'pages/dashboard.html',
            urlType: "relative"
        });
        App.fixIframeCotent();

        $("input[name=q]").keyup(function (event) {
            if (event.keyCode == 13) {
                search_menu();
            }
        });
    });
</script>

</body>
</html>